home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / contrib / chicago.sty < prev    next >
Text File  |  1992-09-14  |  10KB  |  265 lines

  1. % -*- LaTeX -*-
  2. %%% ====================================================================
  3. %%%  @LaTeX-style-file{
  4. %%%     author          = "Glenn Paulley",
  5. %%%     version         = "4",
  6. %%%     date            = "31 August 1992",
  7. %%%     time            = "09:42:44 199",
  8. %%%     filename        = "chicago.sty",
  9. %%%     address         = "Data Structuring Group
  10. %%%                        Department of Computer Science
  11. %%%                        University of Waterloo
  12. %%%                        Waterloo, Ontario, Canada
  13. %%%                        N2L 3G1",
  14. %%%     telephone       = "(519) 885-1211",
  15. %%%     FAX             = "(519) 885-1208",
  16. %%%     checksum        = "44674 264 1050 10394",
  17. %%%     email           = "gnpaulle@bluebox.uwaterloo.ca",
  18. %%%     codetable       = "ISO/ASCII",
  19. %%%     keywords        = "",
  20. %%%     supported       = "yes",
  21. %%%     abstract        = "Contains the LaTeX style command definitions
  22. %%%                        for the Chicago BibTeX styles chicago.bst and
  23. %%%                        chicagoa.bst. For details, see below.",
  24. %%%     docstring       = "The checksum field above contains a CRC-16
  25. %%%                        checksum as the first value, followed by the
  26. %%%                        equivalent of the standard UNIX wc (word
  27. %%%                        count) utility output of lines, words, and
  28. %%%                        characters.  This is produced by Robert
  29. %%%                        Solovay's checksum utility.",
  30. %%%  }
  31. %%% ====================================================================
  32. %
  33. % chicago.sty: Style file for use with bibtex style chicago.bst, for
  34. % bibliographies formatted according to the 13th Edition of the Chicago
  35. % Manual of Style.
  36. %
  37. % 'newapa.bst' was made from 'plain.bst', 'named.bst', and 'apalike.bst',
  38. % with lots of tweaking to make it look like APA style, along with tips
  39. % from Young Ryu and Brian Reiser's modifications of 'apalike.bst'.
  40. % newapa.sty formed the basis of this style, chicago.sty. Author-date
  41. % references in newapa.bst formed the basis for chicago.bst. Chicagoa.bst
  42. % supports annotations.
  43. %
  44. % Version 4 (August, 1992):
  45. % - fixed chicago.bst and chicagoa.bst to handle long author lists in
  46. %   sorting
  47. % - fixed chicago.bst and chicagoa.bst so that missing page numbers in
  48. %   ``article'' entries are handled correctly
  49. % - modified chicago.sty to format entries with 2nd and subsequent lines
  50. %   indented.
  51. %
  52. %   Citation format: (author-last-name year)
  53. %             (author-last-name and author-last-name year)
  54. %             (author-last-name et al. year)
  55. %             (author-last-name)
  56. %             author-last-name
  57. %             author-last-name (year)
  58. %             (author-last-name and author-last-name)
  59. %             (author-last-name et al.)
  60. %             (year) or (year,year)
  61. %             year or year,year
  62. %
  63. %   Reference list ordering: alphabetical by author or whatever passes
  64. %    for author in the absence of one.
  65. %
  66. % This BibTeX style has support for abbreviated author lists and for
  67. %    year-only citations.  This is done by having the citations
  68. %    actually look like
  69. %
  70. %    \citeauthoryear{full-author-info}{abbrev-author-info}{year}
  71. %
  72. % The LaTeX style has to have the following (or similar)
  73. %
  74. %     \let\@internalcite\cite
  75. %     \def\fullcite{\def\citeauthoryear##1##2##3{##1, ##3}\@internalcite}
  76. %     \def\fullciteA{\def\citeauthoryear##1##2##3{##1}\@internalcite}
  77. %     \def\shortcite{\def\citeauthoryear##1##2##3{##2, ##3}\@internalcite}
  78. %     \def\shortciteA{\def\citeauthoryear##1##2##3{##2}\@internalcite}
  79. %     \def\citeyear{\def\citeauthoryear##1##2##3{##3}\@internalcite}
  80. %
  81. % -------------------------------------------------------------------------
  82. % This file implements citations for the ``chicago'' bibliography style.
  83. %  Place it in a file called chicago.sty in the TeX search path.
  84. %(Placing it in the same directory as the LaTeX document should also work.)
  85. %
  86. %    This file is a modification of the ``newapa'' LaTeX style,
  87. %    originally adapted by Steven Spencer from the ``apalike'' LaTeX style.
  88. %    It was originally modified by Stephen N. Spencer, with further
  89. %    modifications by Young U. Ryu.
  90. %
  91. % The ``chicago'' BibTeX bibliography style creates citations with labels:
  92. %       \citeauthoryear{author-info}{abbrev. author-info}{year}
  93. %
  94. % These labels are processed by the following LaTeX commands:
  95. %
  96. %  \cite{key}
  97. %    which produces citations with full author list and year.
  98. %    eg. (Brown 1978; Jarke, Turner, Stohl, et al. 1985)
  99. %  \citeNP{key}
  100. %    which produces citations with full author list and year, but without
  101. %    enclosing parentheses:
  102. %    eg. Brown 1978; Jarke, Turner and Stohl 1985
  103. %  \citeA{key}
  104. %    which produces citations with only the full author list.
  105. %    eg. (Brown; Jarke, Turner and Stohl)
  106. %  \citeANP{key}
  107. %    which produces citations with only the full author list, without
  108. %    parentheses eg. Brown; Jarke, Turner and Stohl
  109. %  \citeN{key}
  110. %    which produces citations with the full author list and year, but
  111. %    can be used as nouns in a sentence; no parentheses appear around
  112. %    the author names, but only around the year.
  113. %      eg. Shneiderman (1978) states that......
  114. %    \citeN should only be used for a single citation.
  115. %  \shortcite{key}
  116. %    which produces citations with abbreviated author list and year.
  117. %  \shortciteNP{key}
  118. %    which produces citations with abbreviated author list and year.
  119. %  \shortciteA{key}
  120. %    which produces only the abbreviated author list.
  121. %  \shortciteANP{key}
  122. %    which produces only the abbreviated author list.
  123. %  \shortciteN{key}
  124. %    which produces the abbreviated author list and year, with only the
  125. %    year in parentheses. Use with only one citation.
  126. %  \citeyear{key}
  127. %    which produces the year information only, within parentheses.
  128. %  \citeyearNP{key}
  129. %    which produces the year information only.
  130. %
  131. % Abbreviated author lists use the ``et al.'' construct.
  132. %
  133. % `NP' means `no parentheses'.
  134. %
  135. % This LaTeX style file must be used with the ``chicago'' or ``chicagoa''
  136. % (annotated chicago style) BibTeX styles.
  137. %
  138. \typeout{Using Chicago Manual of Style bibliography: 31 August 1992}
  139. %
  140. % -------------------------------------------------------------------------
  141. %
  142. % Citation macros.
  143. %
  144. \let\@internalcite\cite
  145. %
  146. \def\cite{\def\@citeseppen{-1000}%
  147.     \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
  148.     \def\citeauthoryear##1##2##3{##1 ##3}\@internalcite}
  149. \def\citeNP{\def\@citeseppen{-1000}%
  150.     \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
  151.     \def\citeauthoryear##1##2##3{##1 ##3}\@internalcite}
  152. \def\citeN{\def\@citeseppen{-1000}%
  153.     \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
  154.     \def\citeauthoryear##1##2##3{##1 (##3}\@citedata}
  155. \def\citeA{\def\@citeseppen{-1000}%
  156.     \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
  157.     \def\citeauthoryear##1##2##3{##1}\@internalcite}
  158. \def\citeANP{\def\@citeseppen{-1000}%
  159.     \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
  160.     \def\citeauthoryear##1##2##3{##1}\@internalcite}
  161. %
  162. \def\shortcite{\def\@citeseppen{-1000}%
  163.     \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
  164.     \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
  165. \def\shortciteNP{\def\@citeseppen{-1000}%
  166.     \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
  167.     \def\citeauthoryear##1##2##3{##2 ##3}\@internalcite}
  168. \def\shortciteN{\def\@citeseppen{-1000}%
  169.     \def\@cite##1##2{##1\if@tempswa , ##2)\else{)}\fi}%
  170.     \def\citeauthoryear##1##2##3{##2 (##3}\@citedata}
  171. \def\shortciteA{\def\@citeseppen{-1000}%
  172.     \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
  173.     \def\citeauthoryear##1##2##3{##2}\@internalcite}
  174. \def\shortciteANP{\def\@citeseppen{-1000}%
  175.     \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
  176.     \def\citeauthoryear##1##2##3{##2}\@internalcite}
  177. %
  178. \def\citeyear{\def\@citeseppen{-1000}%
  179.     \def\@cite##1##2{(##1\if@tempswa , ##2\fi)}%
  180.     \def\citeauthoryear##1##2##3{##3}\@citedata}
  181. \def\citeyearNP{\def\@citeseppen{-1000}%
  182.     \def\@cite##1##2{##1\if@tempswa , ##2\fi}%
  183.     \def\citeauthoryear##1##2##3{##3}\@citedata}
  184.  
  185. %
  186. % \@citedata and \@citedatax:
  187. %
  188. % Place commas in-between citations in the same \citeyear, \citeyearNP,
  189. % \citeN, or \shortciteN command.
  190. % Use something like \citeN{ref1,ref2,ref3} and \citeN{ref4} for a list.
  191. %
  192. \def\@citedata{%
  193.     \@ifnextchar [{\@tempswatrue\@citedatax}%
  194.                   {\@tempswafalse\@citedatax[]}%
  195. }
  196.  
  197. \def\@citedatax[#1]#2{%
  198. \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
  199.   \def\@citea{}\@cite{\@for\@citeb:=#2\do%
  200.     {\@citea\def\@citea{, }\@ifundefined% by Young
  201.        {b@\@citeb}{{\bf ?}%
  202.        \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
  203. {\csname b@\@citeb\endcsname}}}{#1}}%
  204.  
  205. % don't box citations, separate with ; and a space
  206. % also, make the penalty between citations negative: a good place to break.
  207. %
  208. \def\@citex[#1]#2{%
  209. \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
  210.   \def\@citea{}\@cite{\@for\@citeb:=#2\do%
  211.     {\@citea\def\@citea{; }\@ifundefined% by Young
  212.        {b@\@citeb}{{\bf ?}%
  213.        \@warning{Citation `\@citeb' on page \thepage \space undefined}}%
  214. {\csname b@\@citeb\endcsname}}}{#1}}%
  215.  
  216. % (from apalike.sty)
  217. % No labels in the bibliography.
  218. %
  219. \def\@biblabel#1{}
  220.  
  221. % (from apalike.sty)
  222. % Set length of hanging indentation for bibliography entries.
  223. %
  224. \newlength{\bibhang}
  225. \setlength{\bibhang}{2em}
  226.  
  227. % Indent second and subsequent lines of bibliographic entries. Stolen
  228. % from openbib.sty: \newblock is set to {}.
  229.  
  230. \newdimen\bibindent
  231. \bibindent=1.5em
  232. \@ifundefined{refname}%
  233.    {\@ifundefined{chapter}%
  234.      {\newcommand{\refname}{References}}%
  235.      {\newcommand{\refname}{Bibliography}}%
  236.    }%
  237.    {}%
  238. \@ifundefined{chapter}%
  239.  {\def\thebibliography#1{\section*{\refname\@mkboth
  240.    {\uppercase{\refname}}{\uppercase{\refname}}}\list
  241.    {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}
  242.    \leftmargin\labelwidth
  243.    \advance\leftmargin\labelsep
  244.    \advance\leftmargin\bibindent
  245.    \itemindent -\bibindent
  246.    \listparindent \itemindent
  247.    \parsep \z@
  248.    \usecounter{enumi}}
  249.    \def\newblock{}
  250.    \sloppy
  251.    \sfcode`\.=1000\relax}}
  252.  {\def\thebibliography#1{\chapter*{\refname\@mkboth
  253.    {\uppercase{\refname}}{\uppercase{\refname}}}\list
  254.    {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}
  255.    \leftmargin\labelwidth
  256.    \advance\leftmargin\labelsep
  257.    \advance\leftmargin\bibindent
  258.    \itemindent -\bibindent
  259.    \listparindent \itemindent
  260.    \parsep \z@
  261.    \usecounter{enumi}}
  262.    \def\newblock{}
  263.    \sloppy
  264.    \sfcode`\.=1000\relax}}
  265.